<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>OpenParty {% block title %}{% endblock %}</title>
        <link rel="shortcut icon" href="{{ MEDIA_URL }}favicon.ico" />
        <link rel="stylesheet" type="text/css" media="screen" href="{{ MEDIA_URL }}css/reset.css" />
        <link rel="stylesheet" type="text/css" media="screen" href="{{ MEDIA_URL }}css/960.css" />
        <link rel="stylesheet" type="text/css" media="screen" href="{{ MEDIA_URL }}css/type.css" />
        <link rel="stylesheet" type="text/css" media="screen" href="{{ MEDIA_URL }}css/openparty.css" />
        <script type="text/javascript" charset="utf-8" src="{{ MEDIA_URL }}javascripts/jquery-1.4.2.min.js"></script>
        {% block extra_head %}{% endblock %}
    </head>
    <body>
        <div id="header">
            {% if messages %}
            <ul class="messages" class="grid_12">
            {% for message in messages %}
              <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|safe }}</li>
            {% endfor %}
            </ul>
            <div class="clear"></div>
            {% endif %}
        <div class="gutter">
            <div class="container_16">
                <h1 id="logo" class="grid_7"><a href="/"><img width="300" height="62" src="{{ MEDIA_URL }}images/logo_300.png" alt="Open Party" title="Open Party - IT community unconference" /></a></h1>
                <ul id="toolbar" class="grid_9">
                    {% if user.is_authenticated %}
                    <li>
                        欢迎 <em>{{user.username}}</em>
                    </li>
                    <li>
                        <a title="修改密码" href="{% url change_password %}">[改密码]</a>
                    </li>
                    <li>
                        <a title="登出" href="{% url logout %}">[登出]</a>
                    </li>
                    {% else %}
                    <li>
                        欢迎来到Open Party，您还没有登录
                    </li>
                    <li>
                        请<a title="登录" href="{% url login %}">[登陆]</a>
                    </li>
                    <li>
                        ，没有帐号？现在就<a href="{% url signup %}">[注册]</a>
                    </li>
                    {% endif %}
                </ul>
            </div>
        </div>
        <div class="clear">
        </div>
        <div class="navigator-wrap">
            <div class="navigator container_16">
                <ul class="main-navigator grid_16">
                    <li><a {%  if tab == "index" %}class="active"{%  endif %}  href="/">首页</a></li>
                    <li><a {%  if tab == "event" %}class="active"{%  endif %}  href="{% url event_list %}">活动</a></li>
                    <li><a {%  if tab == "topic" %}class="active"{%  endif %}  href="{% url topic_list %}">话题</a></li>
                    <li><a {%  if tab == "post" %}class="active"{%  endif %}  href="{% url list_post %}">新闻</a></li>
                    <li><a {%  if tab == "tweet" %}class="active"{%  endif %}  href="/tweets">Tweet</a></li>
                    <li><a {%  if tab == "blog" %}class="active"{%  endif %}  href="http://blog.beijing-open-party.org">Blog</a></li>
                    <li><a {%  if tab == "about" %}class="active"{%  endif %}  href="{% url about %}">关于</a></li>
                </ul>
                <div class="clear">
                </div>
            </div>
        </div>
        </div>
        {% block content %}{% endblock %}
        <div class="clear">
        </div>
        <div id="footer" class="container_12">
            <div class="grid_12">
                <p>
                    &copy; 2010 www.beijing-open-party.org
                    <br/>
                    Powered by <a href="http://djangoproject.com" target="_blank">Django</a>
                    + <a href="http://code.google.com/p/openparty" target="_blank">OpenParty app</a>
                </p>
                <ul class="links">
                    <li>
                        <a href="mailto:dev@beijing-open-party.org">Contact</a>
                    </li>
                    <li>
                        <a href="/feed">RSS Feed</a>
                    </li>
                    <li>
                        <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS Validator</a>
                    </li>
                    <li>
                        <a href="http://validator.w3.org/check?uri=referer">XHTML Validator</a>
                    </li>
                </ul>
            </div>
        </div>

        {% if debug %}{% include "debug.html" %}{% else %}{% include "analytics.html" %}{% endif %}
        {% block extra_body %}{% endblock %}
    </body>
</html>
